import tensorflow as tf

input1 = tf.constant([1.0, 2.0, 3.0], name='input1')  # input1常量
input2 = tf.Variable(tf.random_uniform([3]), name='input2')  # input2变量，初始值为3个随机实数组成的数组
output = tf.add_n([input1, input2], name='add')  # add计算值，为

writer = tf.summary.FileWriter('data_log/l016', graph=tf.get_default_graph())


init_op = tf.global_variables_initializer()

with tf.Session() as sess:
    sess.run(init_op)
    for i in range(10):
        summary = sess.run(output)
        print(summary)
        print(type(summary))
        # writer.add_summary(summary)

writer.close()
